package com.telecom.weixi.parse;


public class OfferOrderInfo {
	String agreeDate;
	String effDate;
	String expDate;
	String offerName;
	private int pos;

	public String toString() {
		return pos + "-" + offerName + "-" + agreeDate + "-" + effDate + "-" + expDate;
	}

	public String getAgreeDate() {
		return agreeDate;
	}

	public void setAgreeDate(String agreeDate) {
		this.agreeDate = agreeDate;
	}

	public String getEffDate() {
		return effDate;
	}

	public void setEffDate(String effDate) {
		this.effDate = effDate;
	}

	public String getExpDate() {
		return expDate;
	}

	public void setExpDate(String expDate) {
		this.expDate = expDate;
	}

	public String getOfferName() {
		return offerName;
		/*
		 * if (StringUtils.isEmpety(offerName)) { return offerName; } else {
		 * return getOfferName(offerName); }
		 */
	}

	@Deprecated
	String getOfferName(String str) {
		StringBuilder builder = new StringBuilder("");
		int start = 0;
		int split = str.length() > 13 ? 13 : str.length();
		int count = 0;
		for (int index = split; index <= str.length();) {
			if (index >= str.length()) {
				index = str.length();
			}
			builder.append(str.substring(start, index) + "\n");
			start = index;
			index += split;
			if (index >= str.length() && count == 0) {
				index = str.length();
				count++;
			}
		}
		String res = "";
		if (builder.lastIndexOf("\n") == builder.length() - 1) {
			res = builder.toString().substring(0, builder.lastIndexOf("\n"));
		} else {
			res = builder.toString();
		}
		return res;
	}

	public void setOfferName(String offerName) {
		this.offerName = offerName;
	}

	public int getPos() {
		return pos;
	}

	public void setPos(int pos) {
		this.pos = pos;
	}

}
